home *** CD-ROM | disk | FTP | other *** search
/ What CD? 12 / What PC June 1997.iso / multi / cyber / cyber95 / _setup.1 / WEB1.POP < prev    next >
Encoding:
Text File  |  1996-09-04  |  1.6 KB  |  74 lines

  1. // web1.pop
  2. // describes a form based on William Latham's "Web Forms"
  3. // extends upon web.pop by adding rotational commands to horn forms
  4.  
  5. population 0
  6. dimensions = 1
  7. colour_model RGB
  8. render_quality flat
  9.  
  10. genome 0 {
  11.  
  12.     // top level structure iterates in a circle, creating outward pointing spokes
  13.     setScalarMem( 0, 5 : 3 : 10 ),  // mem[0] = #spokes
  14.     branchFor(
  15.         getScalarMem(0),
  16.         1,        // mem[1] = current spoke [ 0 ... #spokes-1]
  17.  
  18.         // inter-spoke code - rotates in a circle
  19.         *join(
  20.             swivelLeft( div(dtor(360), getScalarMem(0)) ),
  21.             bankLeft( dtor(5:0:60) )
  22.         ),
  23.  
  24.         // spoke code - creates a horn form jutting out at right angles to
  25.         // main circle and then branches smaller sub-horns at right angles
  26.         join(
  27.             swivelRight( dtor(90) ),
  28.  
  29.             // major horn form
  30.             *scope(
  31.                 eggScale( 1 : .5 : 1.5 ),
  32.                 repeat(
  33.                     3 : 2 : 20,
  34.                     join(
  35.                         forward( .5 : 0.01 : 0.6 ),
  36.                         moveHue( .1 : -.2 : .2 ),
  37.                         bankLeft( dtor(5:0:30) ),
  38.                         lay
  39.                     )
  40.                 )
  41.             ), // end major horn form
  42.  
  43.             // minor branches
  44.             eggScale( 1 : .5 : 1.5 ),
  45.             *repeat(
  46.                 3 : 2 : 20,
  47.  
  48.                 join(
  49.                     forward( .5 : 0.01 : 0.6 ),
  50.                     bankLeft( dtor(5:0:30) ),
  51.  
  52.                     // minor horn-form
  53.                     *scope(
  54.                         swivelRight( dtor(90) ),
  55.                         scale( .5 : 0.1 : 1.3 ),
  56.                         repeat(
  57.                             8 : 2 : 40,
  58.                             join( 
  59.                                 forward( .5 : 0.05 : 0.6 ),
  60.                                 moveHue( .1 : -.2 : .2 ),
  61.                                 bankLeft( dtor(5:0:30) ),
  62.                                 lay
  63.                             )
  64.                         )
  65.                     ) // end minor horn form
  66.                 )
  67.             ) // end minor branches
  68.     
  69.         )  // end spoke code
  70.     ) // end web 'branchFor'
  71. }
  72.  
  73. // eof : web1.pop
  74.